// Source : https://leetcode.com/problems/reverse-string/
// Author : simba
// Date   : 2016-06-08

package main

import (
	"fmt"
)

func reverseString(s string) string {
	runes := []rune(s)

	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}

	return string(runes)
}

func main() {
	//固定测试用例
	s1 := "hello"
	a1 := reverseString(s1)
	fmt.Println("字符串", s1)
	fmt.Println("输出答案", a1)
	fmt.Println("正确答案 olleh")
}
